Java Class Library
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
top
The Java Class Library (JCL) is a set of dynamically loadable libraries
that Java Virtual Machine (JVM) languages can call at run time. Because
the Java Platform is not dependent on a specific operating system,
applications cannot rely on any of the platform-native libraries.
Instead, the Java Platform provides a comprehensive set of
standard class libraries, containing the functions common to modern
operating systems. Since Java 9, the Java Class Library can be accessed
through module path using the Java Platform Module System.
JCL serves three purposes within the JVM:
β’ Like other standard code libraries, they provide the programmer a
well-known set of useful facilities, such as container classes and
regular expression processing.
β’ The library provides an abstract interface to tasks that would
normally depend heavily on the hardware and operating system, such as
β’ Some underlying platforms may not support all of the features a Java
application expects. In these cases, the library implementation can
either emulate those features or provide a consistent way to check for
the presence of a specific feature.
Contents
β’ Conformance
β’ Main features
β’ Licensing
β’ Prior licenses
β’ See also
β’ References
β’ External links
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Implementation and configuration
JCL is almost entirely written in Java, except for the parts that need
give access to these functions commonly use Java Native Interface
wrappers to access operating system APIs.
Almost all of JCL is stored in a single Java archive file called
Class Library (rt.jar) is located in the default bootstrap classpathcite-ref-2[2]
and does not have to appear in the classpath declared for the
application. The runtime uses the bootstrap class loader to find the
JCL.
The Java Module System (part of the Java 9 release) broke the monolithic
"rt.jar" JAR file and modularized the JCL itself in several modules with
specified dependencies.cite-ref-3[3]
Conformance
Any Java implementation must pass the Java Technology Compatibility Kit
tests for compliance, which includes JCL tests.
Main features
β’ java.lang contains fundamental classes and interfaces closely tied to
the language and runtime system.
networking, SCTP is available through com.sun.nio.sctp.
β’ Mathematics package: java.math provides mathematical expressions and
evaluation, as well as arbitrary-precision decimal and integer number
datatypes.
β’ Collections and Utilities : built-in Collection data structures, and
and binds to the underlying native system. It also contains the 2D
Graphics API. The Swing package (javax.swing) is built on AWT and
provides a platform-independent widget toolkit, as well as a
pluggable look and feel. It also deals with editable and non-editable
text components.
β’ Sound: interfaces and classes for reading, writing, sequencing, and
synthesizing of sound data.
β’ Text: java.text deals with text, dates, numbers and messages.
β’ Image package: java.awt.image and javax.imageio provide APIs to write,
read, and modify images.
β’ Security is provided by java.security and encryption services are
provided by javax.crypto.
β’ Access to Scripting engines: The javax.script package gives access to
any conforming Scripting language.
β’ Applets: java.applet allows applications to be downloaded over a
network and run within a guarded sandbox
β’ Java Beans: java.beans provides ways to manipulate reusable
components.
β’ Introspection and reflection: java.lang.Class represents a class, but
other classes such as Method and Constructor are available in
java.lang.reflect.
Licensing
Prior licenses
Before the release of OpenJDK, the JDK was based on a
Following their promise to release a fully buildable JDK based on almost
completely free and open-source code in the first half of 2007,cite-ref-4[4] Sun
released the complete source code of the Class Library under the GPL on
May 8, 2007, except some limited parts that were licensed by Sun from
third parties who did not want their code to be released under an
open-source license.cite-ref-5[5] Sun's goal was to replace the parts that remain
proprietary and closed source with alternative implementations and make
the Class Library completely free and open source.
Until December 2010, the remaining encumbered part of the JDK was made
build the JDK but not necessary to run it. as of May 2007, the only part
of the Class library that remained proprietary and closed-source (4% as
of May 2007 for OpenJDK 7,cite-ref-7[7] and less than 1% as of May 2008 and
Since the first May 2007 release, Sun, with the help of the community,
released as open-source or replaced with open-source alternatives almost
all the encumbered code:
β’ All the audio engine code, including the software synthesizer, became
replaced by a new synthesizer developed specifically for OpenJDK called
Gervill,cite-ref-13[13]
β’ All cryptography classes were released as open-source,cite-ref-14[14]
β’ The code that scales and rasterizes fonts uses open source
pluggable layer in the JDK, so that the commercial release of Java can
use the original, proprietary color management system and OpenJDK can
use LittleCMS.
β’ The anti-aliasing graphics rasterizer code uses the open source Pisces
β’ The JavaScript plugin is open source (the JavaScript engine itself was
open source from the beginning).cite-ref-20[20]
Open source release
Beginning in December 2010, all the so-called binary plugs were replaced
by open source replacements, making the entire JDK open.cite-ref-21[21]
Alternative implementations
GNU Classpath is the other main free software class library for Java.
Contrary to other implementations, it only implements the Class Library,
Apache Harmony was another free software class library. Its aim was to
implement the other parts of the Java stack (Virtual Machine, Compiler,
and other tools required for any Java implementation).
See also
References
cite-note-22. β "How Classes are Found". Oracle Corporation. Archived from the original on 2009-04-25. Retrieved 2015-12-05.
cite-note-33. β "JDK Module Summary". Oracle Corporation. 2015-10-23. Archived from the original on 2015-12-08. Retrieved 2015-11-29.
cite-note-44. β "Free and Open Source Java - FAQ". sun.com. May 2007. Archived from the original on May 22, 2007. Retrieved 2024-06-27.
cite-note-55. β citerefrich-green2007Rich Green (2007-05-08). "Open JDK is here!". Sun Microsystems. Archived from the original on 2012-02-07. Retrieved 2011-11-25.
cite-note-66. β "OpenJDK Binary Plugs". Sun Microsystems. 2007-05-08. Archived from the original on 2012-08-26. Retrieved 2011-11-25.
cite-note-77. β citereffitzsimmons2007Fitzsimmons, Thomas (2007-05-18). "Plans for OpenJDK". Retrieved 2007-05-22.
cite-note-88. β citerefangel2008Angel, Lillian (2008-03-13). "OpenJDK to replace IcedTea in Fedora 9". Archived from the original on 2012-12-10. Retrieved 2008-04-05.
cite-note-99. β citerefwade2008Wade, Karsten (2008-03-13). "OpenJDK in Fedora 9!". redhatmagazine.com. Archived from the original on 2008-04-21. Retrieved 2008-04-05. Thomas Fitzsimmons updated the Fedora 9 release notes source pages to reflect that Fedora 9 would ship with OpenJDK 6 instead of the IcedTea implementation of OpenJDK 7. Fedora 9 (Sulphur) is due to release in May 2008.
cite-note-1010. β citerefherron2007Herron, David (2007-10-04). "Plans for OpenJDK". Archived from the original on 2007-10-11. Retrieved 2007-10-09.
cite-note-openjdkb10-1111. β "OpenJDK 6 b10 source posted". 2008-05-30. Archived from the original on 2009-06-18. Retrieved 2008-06-01.
cite-note-1212. β "audio-engine project page". Archived from the original on 2007-05-16. Retrieved 2007-05-19.
cite-note-1313. β "Gervill β Software Synthesizer". Archived from the original on 2011-10-04. Retrieved 2008-06-01.
cite-note-1414. β "Crypto has been added to OpenJDK". 2007-09-27. Archived from the original on 2007-12-25. Retrieved 2007-10-07.
cite-note-1515. β "font-scaler projectpage". Archived from the original on 2015-06-10. Retrieved 2007-05-19.
cite-note-2dproject-1616. β "Java2D project page". Archived from the original on 2007-05-16. Retrieved 2007-05-19.
cite-note-1717. β "Freetype font rasteriser". 2007-08-07. Archived from the original on 2009-01-07. Retrieved 2007-11-24.
cite-note-1818. β "Welcome to the PhoneME project". Archived from phoneme.dev.java.net/ the original on 2007-06-10. {{cite web}}: Check |url= value (help)
cite-note-1919. β "graphics-rasterizer project page". Archived from the original on 2007-05-16. Retrieved 2007-05-19.
cite-note-2121. β citerefkelly-o-hair2010Kelly O'Hair (December 2010). "OpenJDK7 and OpenJDK6 Binary Plugs Logic Removed". Oracle Corporation. Archived from the original on 2022-04-07. Retrieved 2011-11-25.
External links
β’ Java SE Main page
β’ Java SE 24 API Javadocs
β’ Java SE API documentation
β’ Java software development kits (status as of August 2006):
β’ 1.7 (early development)
β’ 1.6 (stable, current)
β’ 1.5 (stable)
β’ 1.4 (stable)
β’ 1.3 (obsolete)